<%@ page import="cn.myschool.entity.Subject" %>
<%@ page import="cn.myschool.severs.SubjectServer" %>
<%@ page import="cn.myschool.entity.Grade" %>
<%@ page import="java.util.List" %>
<%@ page import="cn.myschool.severs.GradeServer" %>
Created by IntelliJ IDEA.
  User: 17695
  Date: 2022-07-04
  Time: 16:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>超市账单管理系统</title>
    <link rel="stylesheet" href="css/public.css"/>
    <link rel="stylesheet" href="css/style.css"/>
</head>
<body>



<section class="publicMian ">

        <%
            String id = request.getParameter("id");
            Subject subject = SubjectServer.ME.get(Integer.parseInt(id));
        %>
    <div class="providerAdd">
            <form action="dosubjectUpdate.jsp">

                <div class="">
                    <label for="id">id：</label>
                    <input type="text" name="id" id="id" value="<%=subject.getId()%>" readonly="readonly"/>
                    <span>*</span>
                </div>
                <div>
                    <label for="subjectname">课程名称：</label>
                    <input type="text" name="subjectname" id="subjectname" placeholder="<%=subject.getSubjectname()%>"/>
                    <span >*</span>
                </div>
                <div>
                    <label for="classhour">课时：</label>
                    <input type="text" name="classhour" id="classhour" placeholder="<%=subject.getClasshour() %>"/>
                    <span>*</span>

                </div>
                <div><label for="subjectname">年级：：</label>

                    <select name="gradeid">
                        <%
                            List<Grade> grades = GradeServer.ME.findAll();
                            for (Grade grade :grades) {
                                String gname = grade.getGname();
                               int sid = grade.getId();

                        %>
                        <option value=<%=sid%>><%=gname%></option>
                        <%
                            }
                        %>
                    </select>

                </div>

                <div class="providerAddBtn">
                    <input type="submit" value="提交" />
                    <input type="button" value="返回" onclick="history.back(-1)"/>
                </div>
            </form>
        </div>

    </div>
</section>
<footer class="footer">
    版权归北大青鸟
</footer>
<script src="js/time.js"></script>

</body>
</html>
